package org.infodavid.common.model.impl.criteria;

import org.joda.time.LocalDateTime;

import org.infodavid.common.model.criteria.IEventCriteria;
import org.infodavid.common.model.impl.criteria.SortCriteriaImpl;

/**
 * The Class EventCriteriaImpl.
 */
public class EventCriteriaImpl extends SortCriteriaImpl implements IEventCriteria {

	/** The Constant serialVersionUID. */
	private static final long serialVersionUID = -5781804069003150280L;

	/** The start time. */
	private LocalDateTime startTime = null;

	/** The end time. */
	private LocalDateTime endTime = null;

	/** The user key. */
	private Long ownerKey = null;

	/**
	 * The Constructor.
	 */
	public EventCriteriaImpl() {
		super();
	}

	/*
	 * (non-Javadoc)
	 * @see org.infodavid.common.model.criteria.IEventCriteria#getOwnerKey()
	 */
	public Long getOwnerKey() {
		return ownerKey;
	}

	/*
	 * (non-Javadoc)
	 * @see org.infodavid.common.model.criteria.IBasicEventCriteria#getStartTime()
	 */
	public LocalDateTime getStartTime() {
		return startTime;
	}

	/*
	 * (non-Javadoc)
	 * @see org.infodavid.common.model.criteria.IBasicEventCriteria#getEndTime()
	 */
	public LocalDateTime getEndTime() {
		return endTime;
	}

	/*
	 * (non-Javadoc)
	 * @see org.infodavid.common.model.criteria.IEventCriteria#setOwnerKey(java.lang.Long)
	 */
	public void setOwnerKey(final Long value) {
		ownerKey = value;
	}

	/*
	 * (non-Javadoc)
	 * @see
	 * org.infodavid.common.model.criteria.IBasicEventCriteria#setStartTime(org.joda.time.LocalDateTime)
	 */
	public void setStartTime(final LocalDateTime value) {
		startTime = value;
	}

	/*
	 * (non-Javadoc)
	 * @see
	 * org.infodavid.common.model.criteria.IBasicEventCriteria#setEndTime(org.joda.time.LocalDateTime)
	 */
	public void setEndTime(final LocalDateTime value) {
		endTime = value;
	}

	/*
	 * See super class or interface. (non-Javadoc)
	 * @return the string
	 * @see org.infodavid.common.impl.model.criteria.SearchCriteriaImpl#toString()
	 */
	@Override
	public String toString() {
		final StringBuilder builder = new StringBuilder();

		builder.append(super.toString());
		builder.append("[ownerKey=");
		builder.append(ownerKey);
		builder.append(", startTime=");
		builder.append(startTime);
		builder.append(", endTime=");
		builder.append(endTime);
		builder.append("]");

		return builder.toString();
	}
}
